<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>石头滚动</title>
  <style>
     *{
       margin: 0;
       padding: 0;
       box-sizing: border-box;
     }
      body{
           width: 100vw;
          height: 100vh;
          display: flex;
          justify-content: center;
          align-items: center;
          background-color: #262A35;
      }
      .wrapper{
        width: 200px;
        height: 200px;
        position: relative;
      }
      .hill{
        position: absolute;
        width: 278px;
        height:200px;
        top:190px;
        transform: rotate(-45deg);
        border-top: 5px  solid #fff;
        transform-origin: left top;
      }
      .stone{
        width: 30px;
        height: 30px;
        border-radius: 5px;
        border: 5px solid rgb(47, 151, 248);
        transform: translateY(138px) rotate(-45deg);
        animation: roll 2.5s cubic-bezier(.79, 0, .47, .97) infinite alternate-reverse;
      }
      @keyframes roll {
        0%{
          transform: translateY(138px) rotate(-45deg);
        }
        5%{
          transform: translateY(138px) rotate(-50deg);
        }
        25%{
          transform: translate(50px,90px) rotate(48deg);
        }
        30%{
          transform: translate(50px,90px) rotate(42deg);
        } 
        50%{
          transform: translate(98px,42px) rotate(138deg);
        }
        55%{
          transform:  translate(98px,42px) rotate(130deg);
        }
        72%{
          transform: translate(120px,20px) rotate(227deg);
        }
        76%{
          transform: translate(120px,20px)  rotate(222deg);
        }
        98%{
          transform: translate(138px,0px) rotate(272deg);
        }
        100%{
          transform: translate(138px,0px) rotate(265deg);
        }
      }
  </style>
</head>
<body>
  <div class="wrapper">
    <div class="stone"></div>
    <div class="hill"></div>
  </div>
</body>
</html>